package com.bite.api;

import com.bite.model.ProductInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;

@Slf4j
public class ProductFallbackFactory implements FallbackFactory<ProductInteface> {
    @Override
    public ProductInteface create(Throwable cause) {
        return new ProductInteface() {
            @Override
            public ProductInfo selectProductById(Integer productId) {
                log.error("查询信息异常");
                return new ProductInfo();
            }
            @Override
            public String p1(Integer id) {
                return "";
            }
            @Override
            public String p2(Integer id, String name) {
                return "";
            }
            @Override
            public String p3(ProductInfo productInfo) {
                return "";
            }
            @Override
            public String p4(ProductInfo productInfo) {
                return "";
            }
        };
    }
}
